package com.chenjun.core.vo.atten;

import java.io.Serializable;
import java.lang.reflect.InvocationTargetException;

import org.hibernate.validator.constraints.NotEmpty;
import org.springframework.beans.BeanUtils;

import com.chenjun.core.dao.generator.entity.OaDictAttnType;

@SuppressWarnings("serial")
public class AttnTypeDto implements Serializable {
	
	private Integer id;
	
	@NotEmpty
   	private String code;

	@NotEmpty
    private String name;

    private Integer status;

    private Integer operator;

    private String note;

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Integer getStatus() {
		return status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	public Integer getOperator() {
		return operator;
	}

	public void setOperator(Integer operator) {
		this.operator = operator;
	}

	public String getNote() {
		return note;
	}

	public void setNote(String note) {
		this.note = note;
	}
    
	/**
	 * 根据Bean获取Model模型
	 * @return
	 * PayBean
	 * @throws InvocationTargetException 
	 * @throws IllegalAccessException 
	 */
	public static AttnTypeDto getDtoByModel(OaDictAttnType source) throws IllegalAccessException, InvocationTargetException{
		AttnTypeDto target = new AttnTypeDto();
		BeanUtils.copyProperties(source, target);
		return target;
	}
	
	
	/**
	 * 根据Model获取Bean模型
	 * @return
	 * PayBean
	 * @throws InvocationTargetException 
	 * @throws IllegalAccessException 
	 */
	public static OaDictAttnType getModelByDto(AttnTypeDto source) throws IllegalAccessException, InvocationTargetException{
		OaDictAttnType target = new OaDictAttnType();
		BeanUtils.copyProperties(source, target);
		return target;
	}

}
